package vistas;

import java.rmi.RemoteException;

import javax.swing.JFrame;
import javax.swing.JOptionPane;

import org.hibernate.PersistentObjectException;

public class BaseJFrame extends javax.swing.JFrame {

	protected void handleException(Exception ex) {
		try{
			ex.printStackTrace();
			throw ex;
		}catch(RemoteException e){
			JOptionPane.showMessageDialog(new JFrame(), "Ocurrio un problema al intentar conectar con la CPR.");
			
		}catch(PersistentObjectException e){
			JOptionPane.showMessageDialog(new JFrame(), "Ocurrio un error en el servidor.");
		}catch(Exception e){
			JOptionPane.showMessageDialog(new JFrame(), e.getMessage());
		}
	}
}
